package com.forward.uploadapp.util;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by ljh on 17-12-15.
 */

public class ToastUtils {
    private static Toast mToast;

    /**
     * 单例弹出 每次会覆盖上一次的内容
     *
     * @param context
     * @param content
     */
    public static void toast(Context context, String content) {
        if (mToast == null) {
            mToast = Toast.makeText(context, content, Toast.LENGTH_SHORT);
        } else {
            mToast.setText(content);
        }
        mToast.show();
    }
}
